package com.hd123.rumba.qt.collate;

import java.io.Serializable;

public class CollateItem implements Serializable {
  private Integer tableNum;
  private Integer itemNum;
  private String name;
  private String label;
  private Integer type;
  private Integer displayWidth;

  public boolean equals(Object o) {
    if (o instanceof CollateItem) {
      CollateItem c = (CollateItem) o;
      return tableNum.equals(c.getTableNum()) && itemNum.equals(c.getItemNum());
    }
    return false;
  }

  public int hashCode() {
    return tableNum.intValue() * 1000 + itemNum.intValue();
  }

  public Integer getDisplayWidth() {
    return displayWidth;
  }

  public void setDisplayWidth(Integer displayWidth) {
    this.displayWidth = displayWidth;
  }

  public Integer getItemNum() {
    return itemNum;
  }

  public void setItemNum(Integer itemNum) {
    this.itemNum = itemNum;
  }

  public String getLabel() {
    return label;
  }

  public void setLabel(String label) {
    this.label = label;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Integer getTableNum() {
    return tableNum;
  }

  public void setTableNum(Integer tableNum) {
    this.tableNum = tableNum;
  }

  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

}
